xen.git
20 years agoThis patch adds a quick check in "xm save" to make sure the path given
emellor@ewan [Tue, 27 Sep 2005 14:06:40 +0000 (15:06 +0100)]
This patch adds a quick check in "xm save" to make sure the path given
exists, and is writable.

This will fix the issue detected by xm-test 03_save_bogusfile_neg.

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoThis patch cleans up some of the argument usage in PrettyPrint.py to
emellor@ewan [Tue, 27 Sep 2005 14:03:00 +0000 (15:03 +0100)]
This patch cleans up some of the argument usage in PrettyPrint.py to
avoid a stack trace when doing an 'xm list -l'.  Most of the
prettyprint() methods were called with 1 argument, but the functions
required 2 (one of which was unused).

Signed-off-by: Dan Smith <danms@us.ibm.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove DBMap etc from XendDomainInfo, moving the handling of the domain root
emellor@ewan [Tue, 27 Sep 2005 13:49:31 +0000 (14:49 +0100)]
Remove DBMap etc from XendDomainInfo, moving the handling of the domain root
and VM root totally into XendDomainInfo.  The DBMap stuff was all cruft,
following the move to xstransact.  Removing it may also help those suffering
from poor start-up times caused by a large store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove the domain and VM paths from the store when destroying a domain. This
emellor@ewan [Tue, 27 Sep 2005 13:36:58 +0000 (14:36 +0100)]
Remove the domain and VM paths from the store when destroying a domain.  This
goes a long way towards fixing the problem of stale entries in the store.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerge.
emellor@ewan [Tue, 27 Sep 2005 12:54:02 +0000 (13:54 +0100)]
Merge.

20 years agoDetangle the restart/reboot/halt/save/restore code. There is now one point
emellor@ewan [Tue, 27 Sep 2005 12:53:06 +0000 (13:53 +0100)]
Detangle the restart/reboot/halt/save/restore code.  There is now one point
for management of shutdown state, XendDomainInfo.refreshShutdown, which is
able to cope whatever the current state of the domain.  This fixes bug #124:
running reboot within a domU doesn't bring the domain back up after shutdown,
and bug #256: "xm reboot" could not make domU reboot.

Fix the refreshing inside XendDomain to ensure that the values returned by xm
list reflect reality correctly.  We were removing XendDomainInfo instances,
but not creating them on start-up, so if xend were restarted, domain
information was being lost.

Merge XendDomain.dom0_unknown and initial_refresh into
XendDomainInfo.recreate.

Catch exceptions inside callInfo, and reraise them as XendErrors.

Remove unused XendDomain.close.

Further improvements are needed to XendDomainInfo to ensure that it avoids all
race conditions on shutdown, and can cope correctly with xend restarting
during a shutdown.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoUse constant in XendDomainInfo rather than embedding a string literal.
emellor@ewan [Tue, 27 Sep 2005 11:30:13 +0000 (12:30 +0100)]
Use constant in XendDomainInfo rather than embedding a string literal.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded missing import socket statement.
emellor@ewan [Tue, 27 Sep 2005 11:29:36 +0000 (12:29 +0100)]
Added missing import socket statement.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove non-transactional and non-idempotent code out of
kaf24@firebug.cl.cam.ac.uk [Mon, 26 Sep 2005 18:13:57 +0000 (19:13 +0100)]
Move non-transactional and non-idempotent code out of
xenstore transaction retry loops in our device drivers.
Otherwise things get very smelly if a transaction fails and
is retried.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoxenstore fires @releaseDomain both when a domain shuts
kaf24@firebug.cl.cam.ac.uk [Mon, 26 Sep 2005 17:49:21 +0000 (18:49 +0100)]
xenstore fires @releaseDomain both when a domain shuts
down and when it eventually dies. xenconsoled now only
relinquishes its handle on a domain when it dies. This
allows us to 'xm console' connect to a crashed domain,
which is very useful!

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoxenbus_transaction_end() returns negative error code.
kaf24@firebug.cl.cam.ac.uk [Mon, 26 Sep 2005 15:31:33 +0000 (16:31 +0100)]
xenbus_transaction_end() returns negative error code.
Therefore need to test for -EAGAIN (not EAGAIN).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoFix so that 'make uninstall' won't fail if /etc/xen
kaf24@firebug.cl.cam.ac.uk [Sun, 25 Sep 2005 10:47:22 +0000 (11:47 +0100)]
Fix so that 'make uninstall' won't fail if /etc/xen
doesn't exist.

20 years agoAdd helper method XendDomain.callInfo that stubs through into XendDomainInfo.
emellor@ewan [Sat, 24 Sep 2005 22:10:31 +0000 (23:10 +0100)]
Add helper method XendDomain.callInfo that stubs through into XendDomainInfo.
This is used to remove much of the code duplication in the public methods there.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNothing.
emellor@ewan [Sat, 24 Sep 2005 21:57:26 +0000 (22:57 +0100)]
Nothing.

20 years agoMerge.
emellor@ewan [Sat, 24 Sep 2005 21:57:04 +0000 (22:57 +0100)]
Merge.

20 years agoAdded default value for ssidref -- 0.
emellor@ewan [Sat, 24 Sep 2005 19:41:48 +0000 (20:41 +0100)]
Added default value for ssidref -- 0.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove ImageHandler registration into image.py from XendDomainInfo.py. Move
emellor@ewan [Sat, 24 Sep 2005 19:36:15 +0000 (20:36 +0100)]
Move ImageHandler registration into image.py from XendDomainInfo.py.  Move
ImageHandler.create and findImageHandlerClass to the module level, and inline
addImageHandlerClass.  Move ImageHandler.kernel, ramdisk, cmdline, and flags,
which seem inadvertently to have been declared as class variables, and make
them instance variables instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix build for pedantic compilers.
kaf24@firebug.cl.cam.ac.uk [Sat, 24 Sep 2005 14:35:47 +0000 (15:35 +0100)]
Fix build for pedantic compilers.

20 years agoFix tpm split driver to follow changes in the xenbus API.
kaf24@firebug.cl.cam.ac.uk [Sat, 24 Sep 2005 07:58:41 +0000 (08:58 +0100)]
Fix tpm split driver to follow changes in the xenbus API.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoUpdate User's Guide installation section to mention hotplug.
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 19:10:32 +0000 (20:10 +0100)]
Update User's Guide installation section to mention hotplug.

Now that hotplug seems to be necessary to boot new domains (at least, to
get disk access in those domains), add a note to the installation guide
mentioning this dependency.

Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
20 years agoAdd an install-time check for hotplug.
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 19:09:59 +0000 (20:09 +0100)]
Add an install-time check for hotplug.

The hotplug subsystem is currently needed for block devices to work, as
of changeset 6742:e9d01c5dc7b4d6b7cda9ade0d137ddb89bb204cc.  Add a
script to check for the presence of hotplug and warn if it isn't found.

Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
20 years agoFix debug build of Xen.
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 16:47:48 +0000 (17:47 +0100)]
Fix debug build of Xen.

20 years agoRemoved unused Blkctl.py. The functionality here has been taken over by the
emellor@ewan [Fri, 23 Sep 2005 16:17:22 +0000 (17:17 +0100)]
Removed unused Blkctl.py.  The functionality here has been taken over by the
new hotplug system.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@ewan [Fri, 23 Sep 2005 15:57:13 +0000 (16:57 +0100)]
Merged.

20 years agoMerge the duplicated code for create, destroy, migrate, sysrq, and shutdown
emellor@ewan [Fri, 23 Sep 2005 15:56:46 +0000 (16:56 +0100)]
Merge the duplicated code for create, destroy, migrate, sysrq, and shutdown
into one handler that dynamically imports the correct subcommand handler.
Remove the fullhelp cruft, which was referencing something not actually present,
and was unused.  Remove xm_network_attach and xm_network_detach, which were
providing code for unadvertised and unsupported functionality.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoNeaten the configuration parsing code. Add a self parameter to
emellor@ewan [Fri, 23 Sep 2005 15:53:57 +0000 (16:53 +0100)]
Neaten the configuration parsing code.  Add a self parameter to
configureBootloading.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove ImageHandler.create call to initDomain, after the call to xc.domain_create.
emellor@ewan [Fri, 23 Sep 2005 15:50:02 +0000 (16:50 +0100)]
Move ImageHandler.create call to initDomain, after the call to xc.domain_create.
This ensures that ImageHandler has the correct domain ID available to it, which
seems sensible in general, and is necessary for the VMX VNC support in
particular.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRestructure GNTTABOP_map_grant_ref.
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 15:28:17 +0000 (16:28 +0100)]
Restructure GNTTABOP_map_grant_ref.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove unused XendDB.py.
emellor@ewan [Fri, 23 Sep 2005 15:05:37 +0000 (16:05 +0100)]
Remove unused XendDB.py.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused tempfile.py. Even if anyone were using it, they shouldn't be --
emellor@ewan [Fri, 23 Sep 2005 15:04:43 +0000 (16:04 +0100)]
Remove unused tempfile.py.  Even if anyone were using it, they shouldn't be --
there's tempfile functionality in the Python standard library.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFix call with missing parameters.
emellor@ewan [Fri, 23 Sep 2005 14:53:36 +0000 (15:53 +0100)]
Fix call with missing parameters.

20 years agoMake PAE defs in xg_private.h usable in both 32- and
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 13:43:52 +0000 (14:43 +0100)]
Make PAE defs in xg_private.h usable in both 32- and
64-bit builds.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoAdd check for speed (takes 33 minutes on my laptop, OUCH!)
emellor@ewan [Fri, 23 Sep 2005 13:28:16 +0000 (14:28 +0100)]
Add check for speed (takes 33 minutes on my laptop, OUCH!)

Make xenstored use tdb, transactions can soft-fail (EAGAIN)
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT.
Speeds up transactions by over 1000 times, should be NFS safe.
New program: xs_tdb_dump to dump raw TDB contents.
Don't do failure testing: we are no longer robust against all ENOMEM 8(
Introduce "struct node" which contains perms, children and data.
Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints.
Gently modify TDB to use talloc, not do alloc on tdb_delete.

Fix up transaction users for new semantics.
Don't need a transaction around a single read in xen/i386/kernel/smpboot.c.
Python: transaction_start() returns True/False rather than raising exception on EAGAIN.
Fix usage comment on xs_transaction_end().
Include stdarg to xs_tdb_dump so it compiles.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 years agoMake xenstored use tdb, transactions can soft-fail (EAGAIN)
Rusty Russell [Fri, 23 Sep 2005 13:25:01 +0000 (14:25 +0100)]
Make xenstored use tdb, transactions can soft-fail (EAGAIN)
Transactions no longer take root dir, no longer lock & block: commit can fail spuriously with EAGAIN, not ETIMEDOUT.
Speeds up transactions by over 1000 times, should be NFS safe.
New program: xs_tdb_dump to dump raw TDB contents.
Don't do failure testing: we are no longer robust against all ENOMEM 8(
Introduce "struct node" which contains perms, children and data.
Make struct xs_permissions unpadded, so we can write to tdb w/o valgrind complaints.
Gently modify TDB to use talloc, not do alloc on tdb_delete.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 years agoAdd check for speed (takes 33 minutes on my laptop, OUCH!)
Rusty Russell [Fri, 23 Sep 2005 13:24:58 +0000 (14:24 +0100)]
Add check for speed (takes 33 minutes on my laptop, OUCH!)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
20 years agoAdd VGA acceleration support for cirrus logic device model
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 12:30:54 +0000 (13:30 +0100)]
Add VGA acceleration support for cirrus logic device model

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
20 years agoClean up xc_vmx_build():
kaf24@firebug.cl.cam.ac.uk [Fri, 23 Sep 2005 11:52:43 +0000 (12:52 +0100)]
Clean up xc_vmx_build():
 1. Remove linux parameters.
 2. Remove init ramdisk.
 3. Remove e820 memmap config file parse.
 4. Removed provisional GDT.
 5. Removed some ugly tailing space.

Signed-off-by: Xin B Li <xin.b.li@intel.com>
20 years agoRemove file from sparse tree.
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 19:59:31 +0000 (20:59 +0100)]
Remove file from sparse tree.

20 years agoMinor drivers/xen changes and includes to support xenlinux/ia64
djm@kirby.fc.hp.com [Thu, 22 Sep 2005 18:06:33 +0000 (12:06 -0600)]
Minor drivers/xen changes and includes to support xenlinux/ia64

20 years agoMerge latest xen-unstable into xen-ia64-unstable
djm@kirby.fc.hp.com [Thu, 22 Sep 2005 17:42:01 +0000 (11:42 -0600)]
Merge latest xen-unstable into xen-ia64-unstable

20 years agoPatches and recipe to build an elilo.efi that will boot domain0 with initrd
djm@kirby.fc.hp.com [Thu, 22 Sep 2005 17:34:14 +0000 (11:34 -0600)]
Patches and recipe to build an elilo.efi that will boot domain0 with initrd
and pre-built "xlilo.efi".  Courtesy of Anthony Xu and Fred Yang.

20 years agoMove variable initialisation out of import section. Remove obsolete save
emellor@ewan [Thu, 22 Sep 2005 17:03:16 +0000 (18:03 +0100)]
Move variable initialisation out of import section.  Remove obsolete save
parameter from XendDominInfo.exportToDB.

20 years agoRename XendDomainInfo and DevController.getDomain to getDomid.
emellor@ewan [Thu, 22 Sep 2005 16:58:43 +0000 (17:58 +0100)]
Rename XendDomainInfo and DevController.getDomain to getDomid.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove initDomain out of image.py and into XendDomainInfo. The only thing that
emellor@ewan [Thu, 22 Sep 2005 16:52:07 +0000 (17:52 +0100)]
Move initDomain out of image.py and into XendDomainInfo.  The only thing that
needed any of the state of image.py was the bootloader code, which says there,
but all the rest was doing something that belonged more properly in
XendDomainInfo, with all the other generic domain initialisation code.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded diagnostic message when RuntimeError is raised inside XenStore.exists.
emellor@ewan [Thu, 22 Sep 2005 16:50:29 +0000 (17:50 +0100)]
Added diagnostic message when RuntimeError is raised inside XenStore.exists.
This is one of the first things to be used when xenstored starts up, so a
corrupted filesystem may manifest itself here.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMerged.
emellor@ewan [Thu, 22 Sep 2005 15:12:14 +0000 (16:12 +0100)]
Merged.

20 years agoA number of changes to get save-restore working again:
emellor@ewan [Thu, 22 Sep 2005 15:05:44 +0000 (16:05 +0100)]
A number of changes to get save-restore working again:

Fix the use of configuration inside domain_configure.  The config written by
XendDomainInfo.sxpr has moved, and this function needs to change to match.

Re-add a call to _add_domain inside domain_restore.

Inside XendDomainInfo.restore, perform the appropriate configuration to restore
the domain.

Validate maxmem_KiB, and cap it at memory_KiB if over that value.  Save
requires that value to be correct, as the logic for saving only the pages
in use is not in place inside Xen.

Output the device configuration in sxpr(), as required for save-restore.

Check for image being null when trying to call createDeviceModel -- configure
is called on restore as well as create, and the ImageHandler instance is not
present in the former.

Remove dead code create_blkif.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoFixes a vtpm timeout problem for slow machines.
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 14:19:30 +0000 (15:19 +0100)]
Fixes a vtpm timeout problem for slow machines.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoNetfront/back always use grant tables now. This cleans up a
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 13:36:20 +0000 (14:36 +0100)]
Netfront/back always use grant tables now. This cleans up a
whole bunch of code.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoRemove defunct usb split driver code. It will get replaced with
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 13:05:36 +0000 (14:05 +0100)]
Remove defunct usb split driver code. It will get replaced with
a new working driver at some point.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoIndentation cleanups in linux driver code.
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 13:04:14 +0000 (14:04 +0100)]
Indentation cleanups in linux driver code.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoMerged?
emellor@ewan [Thu, 22 Sep 2005 13:01:01 +0000 (14:01 +0100)]
Merged?

20 years agoRemove all CONFIG_VTI, VTI now works dynamically
djm@kirby.fc.hp.com [Thu, 22 Sep 2005 12:59:57 +0000 (06:59 -0600)]
Remove all CONFIG_VTI, VTI now works dynamically
1.remove vcpu_set_regs and element regs,which are never used
2.remove ia64_prepare_handle_privop,ia64_prepare_handle_break, ia64_prepare_handle_reflection, which are never used.
3.modify related macros for adapting to three level physical to machine table
4.remove all CONFIG_VIT
5.merge ia64_switch_to

Signed-off-by Anthony Xu <Anthony.xu@intel.com>

20 years agoA more comprehensive fix for mapping shared-ring grant
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 11:46:17 +0000 (12:46 +0100)]
A more comprehensive fix for mapping shared-ring grant
references in back-end drivers.

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoThis patch adds a check in xend that prevents a user from trying to
emellor@ewan [Thu, 22 Sep 2005 10:35:35 +0000 (11:35 +0100)]
This patch adds a check in xend that prevents a user from trying to
destroy Dom0.  Currently, xm does not return an error for this case.
Xend tries to destroy dom0 and leaves the system in an unstable
state.  Subsequent attempts to create a domain result in the following
error message:

  Error: Error creating domain: (106, 'Transport endpoint is already \
  connected')

This will fix bugzilla bug #243

Signed-off-by: Dan Smith <danms@us.ibm.com>
20 years agoVMX guest memory calculation in python code is corrupted by changeset
emellor@ewan [Thu, 22 Sep 2005 10:21:37 +0000 (11:21 +0100)]
VMX guest memory calculation in python code is corrupted by changeset
6984, this patch fixes it.

Also print vmx builder parameters before calling vmx builer, just like
what's done before calling linux builder.

With this patch, qemu dm using SDL can work, however qemu dm using VNC
still has bug, we will fix it soon.

Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agothis patch fixes the bug that when "cpu" is not set in config file,
emellor@ewan [Thu, 22 Sep 2005 10:09:11 +0000 (11:09 +0100)]
this patch fixes the bug that when "cpu" is not set in config file,
control panel complains "Error creating domain - int argument required".
Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoThis fixes the "make check" feature of xenstore to properly compile with
kaf24@firebug.cl.cam.ac.uk [Thu, 22 Sep 2005 10:04:30 +0000 (11:04 +0100)]
This fixes the "make check" feature of xenstore to properly compile with
x86-64. When compiling you would get the following error since on x86-64
it was passing a long , when you are expecting an int.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
20 years agoTrivial spelling mistake fix.
jbulpin@paploo.uk.xensource.com [Wed, 21 Sep 2005 22:41:34 +0000 (23:41 +0100)]
Trivial spelling mistake fix.
... but mainly to check that pushes to the repository are working

Signed-off-by: James Bulpin <james@xensource.com>
20 years agoMinor change also needed in vcpu.c for guests to own ar.kr's.
djm@kirby.fc.hp.com [Wed, 21 Sep 2005 21:13:16 +0000 (15:13 -0600)]
Minor change also needed in vcpu.c for guests to own ar.kr's.

20 years agoAnother fix for handling ar.kr's
djm@kirby.fc.hp.com [Wed, 21 Sep 2005 20:13:07 +0000 (14:13 -0600)]
Another fix for handling ar.kr's

20 years agoRemove paravirtualization of ar.kr registers (may need hyperprivop for
djm@kirby.fc.hp.com [Wed, 21 Sep 2005 19:41:25 +0000 (13:41 -0600)]
Remove paravirtualization of ar.kr registers (may need hyperprivop for
mov_to_kr later)
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>

20 years agoThis patch fixes a bug where raise_softirq(SCHEDULE_SOFTIRQ) is called
kaf24@firebug.cl.cam.ac.uk [Wed, 21 Sep 2005 16:58:55 +0000 (16:58 +0000)]
This patch fixes a bug where raise_softirq(SCHEDULE_SOFTIRQ) is called
upon a hlt instruction from a VMX guest, causing repeated VMExits when
the guest is idle. At the same time, it disables the monitor/mwait
feature as it's not feasible to implement for vcpu.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
20 years agoFix mapping of shared ring pages into backend drivers.
kaf24@firebug.cl.cam.ac.uk [Wed, 21 Sep 2005 16:36:46 +0000 (16:36 +0000)]
Fix mapping of shared ring pages into backend drivers.
This should fix observed problems when creating a domain,
causing Xen to print "Could not find PTE entry for
address ...".

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoXenlinux/ia64 can't use xenlinux/x86 version of drivers/acpi/tables.c
djm@kirby.fc.hp.com [Wed, 21 Sep 2005 16:25:47 +0000 (10:25 -0600)]
Xenlinux/ia64 can't use xenlinux/x86 version of drivers/acpi/tables.c
Also more unique naming for directories that are moved aside

20 years agoBuild tweaks for xenlinux/ia64
djm@kirby.fc.hp.com [Wed, 21 Sep 2005 15:50:38 +0000 (09:50 -0600)]
Build tweaks for xenlinux/ia64

20 years agoStart fleshing out -sparse tree for xenlinux/ia64
djm@kirby.fc.hp.com [Wed, 21 Sep 2005 15:06:30 +0000 (09:06 -0600)]
Start fleshing out -sparse tree for xenlinux/ia64

20 years agoMerge.
emellor@ewan [Wed, 21 Sep 2005 14:25:58 +0000 (15:25 +0100)]
Merge.

20 years agoSplit the configuration file parsing and xc dominfo parsing aspects of
emellor@ewan [Wed, 21 Sep 2005 14:23:26 +0000 (15:23 +0100)]
Split the configuration file parsing and xc dominfo parsing aspects of
XendDomainInfo out from the rest of the code, creating an intermediate
dictionary of common format.  This means that the rest of XendDomainInfo can
work whether creating a domain for the first time, or whether xend is
restarted but the domains still exist.  This means that xend is now robust in
the face of restarts.  The phase of validation of configuration details is
now more explicit, and stronger too.

Change the handling of memory sizes in XendDomainInfo's interface to use KiB
in setMemoryTarget and getMemoryTarget.  This gives reasonable granularity
whilst ensuring that we can handle values up to 2TiB without overflowing a
signed 32 bit value.  It is not clear that the xend code, especially the C /
Python interface, is either 64-bit clean or unsigned 32-bit clean, so this is
the safest choice for now.  The behaviour of Python's shift operator will
change in Python 2.4, so it is best to address this problem once we have moved
to that version.

Determine the backend flags on-the-fly, in getBackendFlags, rather than
computing them in advance in configureBackends and storing the value.  Change
addControllerClass so that backend flag information is in this table too,
rather than hard-coded elsewhere.

Improve the error reporting for name clashes.

Remove XendDomainInfo's dependence upon DBMap, and use xstransact directly
instead.  This changes the interface from XendDomain to XendDomainInfo, as
paths rather than DBMaps are passed in.

Remove the XendDomainInfo.recreate and restore flags.  Since the device and
domain handling is now stateless inside xend, much less work is necessary for
recreate and restore procedures, so we can do without these flags.

Remove XendDomainInfo's unused dependency upon SrvDaemon, and its unnecessary
dependence upon PrettyPrint.  Remove the unused show method.

Decouple image.py from XendDomainInfo.bootloader by passing a bootloading flag
into initDomain instead.  Decouple it from XendDomainInfo.config by passing
the semiparsed device configuration into create().  Move configuration in
VmxImageHandler so that rather than being scattered around the class it is in
or called from the configure method.  Device configuration is no longer
available anywhere else.

From Dan Smith <danms@us.ibm.com>:

      I could not find in the existing code the point at which
      a domain was added to the XendDomain list after restore.  Several
      attempts to restore would result in positive log messages, but the
      restored domain would not show up in "xm list".  This patch includes a
      call to _add_domain(), which results in restore working for me.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoDisable debugging-level output.
emellor@ewan [Wed, 21 Sep 2005 14:13:26 +0000 (15:13 +0100)]
Disable debugging-level output.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMatch change to the memory/target value, as it is now in KiB, not bytes.
emellor@ewan [Wed, 21 Sep 2005 14:12:32 +0000 (15:12 +0100)]
Match change to the memory/target value, as it is now in KiB, not bytes.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused DEBUG variable, and -d flag.
emellor@ewan [Wed, 21 Sep 2005 10:31:55 +0000 (11:31 +0100)]
Remove unused DEBUG variable, and -d flag.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemoved unused getLevel method, and don't use intermediate variable called
emellor@ewan [Wed, 21 Sep 2005 10:30:59 +0000 (11:30 +0100)]
Removed unused getLevel method, and don't use intermediate variable called
'log', as this name hides the global logger instance.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded diagnostic messages to the RuntimeError exceptions when they occur inside
emellor@ewan [Wed, 21 Sep 2005 10:29:23 +0000 (11:29 +0100)]
Added diagnostic messages to the RuntimeError exceptions when they occur inside
_read and _write.  Fix gather to not return the string 'None' when reading a
value of type string that does not exist.  The value None should be returned
instead.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoLots of minor changes to please pylint, including matching the number of
emellor@ewan [Wed, 21 Sep 2005 10:26:31 +0000 (11:26 +0100)]
Lots of minor changes to please pylint, including matching the number of
parameters between functions in the base classes and those that override them
in subclasses.  It's hard to see how this code worked at all.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoOn one of pyxc_domain_getinfo's error paths, free the block allocated
emellor@ewan [Wed, 21 Sep 2005 10:24:26 +0000 (11:24 +0100)]
On one of pyxc_domain_getinfo's error paths, free the block allocated
previously.  This would have caused a memory leak when attempting to get info
on a domain that does not exist.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoSome cleanup in tpm-related files.
kaf24@firebug.cl.cam.ac.uk [Wed, 21 Sep 2005 10:13:11 +0000 (10:13 +0000)]
Some cleanup in tpm-related files.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
20 years agoRemoves redundant/unnecessary __vmread/__vmwrite.
kaf24@firebug.cl.cam.ac.uk [Wed, 21 Sep 2005 10:11:02 +0000 (10:11 +0000)]
Removes redundant/unnecessary __vmread/__vmwrite.

Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
20 years agoParse vcpus for VMX guest.
kaf24@firebug.cl.cam.ac.uk [Wed, 21 Sep 2005 09:58:15 +0000 (09:58 +0000)]
Parse vcpus for VMX guest.

Vcpus are passed to device model and vmx domain builder.

Signed-off-by: Yan Li <yanx.li@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
20 years agoFix .hgignore and add missing vtpm patch file.
kaf24@firebug.cl.cam.ac.uk [Wed, 21 Sep 2005 09:56:34 +0000 (09:56 +0000)]
Fix .hgignore and add missing vtpm patch file.

20 years agoSupport files for building xenlinux-ia64 from -sparse tree
djm@kirby.fc.hp.com [Tue, 20 Sep 2005 23:14:54 +0000 (17:14 -0600)]
Support files for building xenlinux-ia64 from -sparse tree

20 years agoClone of Christian's xen-unstable mkbuildtree patch (cset 6960)
djm@kirby.fc.hp.com [Tue, 20 Sep 2005 22:57:09 +0000 (16:57 -0600)]
Clone of Christian's xen-unstable mkbuildtree patch (cset 6960)

20 years agoFix dcr.pp and psr.pp support (non-VTI) so pfmon --system-wide works
djm@kirby.fc.hp.com [Tue, 20 Sep 2005 22:11:19 +0000 (16:11 -0600)]
Fix dcr.pp and psr.pp support (non-VTI) so pfmon --system-wide works
Signed-off by: Dan Magenheimer <dan.magenheimer@hp.com>

20 years agoGet multiple domains working again
djm@kirby.fc.hp.com [Tue, 20 Sep 2005 19:03:25 +0000 (13:03 -0600)]
Get multiple domains working again
Signed-off-by Kevin Tian <kevin.tian@intel.com>

Some interesting issues found related to two small patches:
1. Only "xm console 1" and "Ctrl + ]" can make xenU forward progress,
and however still failed to connect blkback later.
[Reason] Previous event injection on XEN/IPF only set vIRR bit
when evtchn_set_pending. However with the latest xenlinux code, it's
possible for xenlinux to set pending indication and selector when
unmasking some pending event channel. This path has nothing to do with
vIRR bit.

[Solution] We should check event pending every time when
checking pending interrupts before returning to guest.

2. After fixing first issue, nested event is injected when first event
is still in handle with lock held. Then dead lock happens at end of
"xend start".
[Reason] Due to same logic as above, xenlinux may set pending
indication and re-trigger pending event by force_evtchn_callback. On
x86, this stub just does a dummy xen_version hypercall and pending event
will be injected back when leaving hypervisor. However on IA64,
force_evtchn_callback is incautiously made invoking evtchn_interrupt()
directly, while the former may be called with lock held.

[Solution] Just let force_evtchn_callback as empty for simple now.

20 years agoRemove unused variables and imports.
emellor@ewan [Tue, 20 Sep 2005 16:31:22 +0000 (17:31 +0100)]
Remove unused variables and imports.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agodomain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The
emellor@ewan [Tue, 20 Sep 2005 16:29:57 +0000 (17:29 +0100)]
domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter.  The
underlying xc_domain_setmaxmem already took an unsigned int, and
PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way
that longer values would get through here in any case.  Fixing the documentation
and the local variable is the best solution, until someone decides that we need
to support maxmem values greater than 2TiB.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove extraneous semicolon.
emellor@ewan [Tue, 20 Sep 2005 16:25:27 +0000 (17:25 +0100)]
Remove extraneous semicolon.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove definition of xc, to avoid confusing pylint.
emellor@ewan [Tue, 20 Sep 2005 16:25:00 +0000 (17:25 +0100)]
Move definition of xc, to avoid confusing pylint.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoRemove unused import.
emellor@ewan [Tue, 20 Sep 2005 16:24:27 +0000 (17:24 +0100)]
Remove unused import.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMark unused variables as such. Remove unused import.
emellor@ewan [Tue, 20 Sep 2005 16:22:20 +0000 (17:22 +0100)]
Mark unused variables as such.  Remove unused import.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMove definition of xc variable, to save confusing pylint.
emellor@ewan [Tue, 20 Sep 2005 16:21:39 +0000 (17:21 +0100)]
Move definition of xc variable, to save confusing pylint.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoMark unused variable as such.
emellor@ewan [Tue, 20 Sep 2005 16:20:20 +0000 (17:20 +0100)]
Mark unused variable as such.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoAdded debugging message to exception on write.
emellor@ewan [Tue, 20 Sep 2005 16:19:19 +0000 (17:19 +0100)]
Added debugging message to exception on write.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
20 years agoThe vmx guest loading is broken from 6925 because of the new
kaf24@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 16:13:01 +0000 (16:13 +0000)]
The vmx guest loading is broken from 6925 because of the new
DevController code.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
20 years agoFix __save_flags() to not complain when smp_processor_id() is used
kaf24@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 14:44:49 +0000 (14:44 +0000)]
Fix __save_flags() to not complain when smp_processor_id() is used
in a preemptible region (it is always safe).

Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 14:18:23 +0000 (14:18 +0000)]
merge?

20 years agoAdd support to build arch/ia64 xen kernels, also add pre/post link hooks in mkbuildtree.
cl349@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 14:18:01 +0000 (14:18 +0000)]
Add support to build arch/ia64 xen kernels, also add pre/post link hooks in mkbuildtree.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
20 years agoFix xenconsole when console page is >= 4GB.
kaf24@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 14:09:07 +0000 (14:09 +0000)]
Fix xenconsole when console page is >= 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
20 years agoPut_page on vmx_set_cr0 for multiple protected/real mode switch.
kaf24@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 13:07:10 +0000 (13:07 +0000)]
Put_page on vmx_set_cr0 for multiple protected/real mode switch.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Chengyuan Li <chengyuan.li@intel.com>
20 years agomerge?
cl349@firebug.cl.cam.ac.uk [Tue, 20 Sep 2005 09:43:46 +0000 (09:43 +0000)]
merge?